using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using OpenSocial.Net.People;

namespace OpenSocial.Net.Web.Sample.UserControls
{
	public partial class PersonControl : System.Web.UI.UserControl
	{
		ulong _userID = 0;
		Person _person = new Person();

		public Person PersonObject
		{
			get { return _person; }
			set { _person = value; }
		}

		public ulong UserID
		{
			get { return _userID; }
			set { _userID = value; }
		}

		protected void Page_Load(object sender, EventArgs e)
		{
			if (!Page.IsPostBack)
			{
				if (_person.ThumbnailLink != null)
				{
					imgThumbnail.ImageUrl = _person.ThumbnailLink.Href;
					imgThumbnail.Visible = true;
				}
			}
		}
	}
}